package com.fortune.rainshine.feign.system;

import com.fortune.rainshine.config.FeignConfig;
import com.fortune.rainshinecommon.base.MsgModel;
import com.fortune.rainshinecommon.base.ParmsModel;
import com.fortune.rainshinecommon.model.system.CardModel;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@FeignClient(value = "rain-shine-system",configuration = FeignConfig.class)
@Controller
public interface CardFeign {

    /**
     * 获取会员卡列表
     * @param parms
     * @return
     */
    @PostMapping("/card/cardList")
    @ResponseBody
    MsgModel cardList(@RequestBody ParmsModel parms);

    /**
     * 获取所有激活的会员卡
     * @return
     */
    @PostMapping("/card/getAllCards")
    @ResponseBody
    List<CardModel> getAllCards();
}
